<?php get_header(); ?>
<!-- Container -->
<div id="content">



<!-- Start SC -->
<div id="SC">

<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_tag()) { ?>
<h2 class="pagetitle">标签为 <strong><?php single_tag_title(); ?></strong> 的存档</h2>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<h2 class="pagetitle">分类为 <strong><?php single_cat_title(); ?></strong> 的存档</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle">按时间 <?php the_time('Y-m-d'); ?> 的存档</h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle">按时间 <?php the_time('Y-m'); ?> 的存档</h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle">按时间 <?php the_time('Y'); ?> 的存档</h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle">Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Blog Archives</h2>
<?php } ?>




<?php $post_num = 0; while (have_posts()) : the_post();$post_num++; ?>
<div class="Post" id="post-<?php the_ID(); ?>">

<div class="PostHead">
<h1><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<small class="PostAuthor">Author: <?php the_author() ?> <?php edit_post_link('Edit'); ?></small>
<p class="PostDate">
<small class="day"><?php the_time('j') ?></small>
<small class="month"><?php the_time('M') ?></small>
<small class="year"><?php the_time('Y') ?></small>
</p>
</div>
  
<div class="PostContent">
<?php the_excerpt() ?>

<?php if($post_num<3): ?>
<div id="PostContent_ads_<?php echo $post_num; ?>"></div>
<?php endif; ?>

</div>
<div class="PostDet">
 <li class="PostCom"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php if(function_exists('the_views')) {$views=the_views('',false); if ($views!=0)echo " , ".$views." Hits"; } ?></li>
 <li class="PostCateg"><?php if(function_exists('st_the_tags'))st_the_tags(); else the_category(', '); ?></li>
</div>
</div>
<div class="clearer"></div>
<?php endwhile; ?>

<div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

<?php else : ?>
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
</div> 
<!-- End SC -->

<!-- Container -->
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>